import Sequelize from 'sequelize'
import sequelize from '../../sequelize'

const Note = sequelize.local.define('note', {
  id: {
    type: Sequelize.STRING.BINARY,
    defaultValue: Sequelize.UUIDV1,
    primaryKey: true
  },
  title: {
    type: Sequelize.STRING(64),
    allowNull: false
  },
  intro: {
    type: Sequelize.STRING(64)
  },
  content: {
    type: Sequelize.STRING(1024)
  },
  sort: {
    type: Sequelize.INTEGER(10),
    defaultValue: 0,
    allowNull: false
  }
}, {
  tableName: 'note'
})
export default Note
